<!DOCTYPE html >
<html>

	<head>
		<meta charset="UTF-8">
		
		<title>购物车</title>
		<meta name="Keywords" content="购物流程" />
		<meta name="Description" content="购物流程" />
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet" href="__TMPL__Public/css/common.css" />
		<link rel="stylesheet" href="__TMPL__Public/css/user.css" />
		<link rel="stylesheet" href="__TMPL__Public/css/public.css" />
		<link rel="stylesheet" href="__TMPL__Public/css/collect.css" />
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Cart/css/flow.css" />

		<script type="text/javascript" src="/themes/wnsc_moblie/newMobile/User/js/area/jquery.min.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/jquery.json.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/transport.js"></script>
		<script type="text/javascript" src="__TMPL__Public/js/common.js"></script>
		<script type="text/javascript" src="/themes/wnsc_moblie/newMobile/Cart/js/cart_list.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/mobile/layer.js"></script>
		<style type="text/css">
			.SZY-CART-SUBMIT-LOADING{   
					float: right;
				    width: 100%;
				    height: 100%;
				    color: #fff;
				    line-height: 2.05rem;
				    font-size: 0.8rem;
				    text-align: center;
				    position: relative;
				    cursor: pointer;
				    background: #f23030;
			}
			.SZY-CART-SUBMIT-LOADING i{   
					width: 20px;
				    height: 20px;
				    background: url(/themes/wnsc_moblie/newMobile/Cart/images/loading.gif) no-repeat;
				    background-size: 20px 20px;
				    vertical-align: middle;
				    display: inline-block;
			}
			
		</style>
	</head>

	<body style="background:#e5e5e5;">
		<?php
				$agent = $_SERVER['HTTP_USER_AGENT'];
				if(strpos($agent,"Html5Plus") === false){
		?>
		<div class="tab_nav">
			<div class="header" style=" position:relative">
				<div class="h-left">
					<a class="sb-back" href="javascript:history.back(-1)" title="返回"></a>
				</div>
				<div class="h-mid"> 购物车 </div>
				<aside class="show-menu-btn">
					<div id="show_more" class="show-menu">
						<a href="javascript:;"></a>
					</div>
				</aside>
			</div>

		</div>
		<?php
			}
		?>
		<mtc_include file="Public:right_nav" />
		<div id="cart_list"></div>
  	</div>
    <div style="height:50px"></div>
	<div class="flow_bottom">
		<input type="hidden" name="step" value="update_cart">
		<div class="quanxuan">
			<div class="check-wrapper"> 
				<span  class="cart-checkbox1" onclick="return chkAll_onclick()"></span> 
				<span class="cart-checktext">全选</span> 
			</div>
		</div>
		<div class="info">
			<span class="hot" id="cart_amount_desc"><em>总计：</em>0.00</span>
		</div>
		<div class="right">
			<div class="check-btn bg-color wait-loading SZY-CART-SUBMIT-LOADING" style="display:none"><i></i></div>
			<input type="button" href="javascript:void();" onclick="return selcart_submit();" class="xm-button " value="去结算">
		</div>
	</div>
	
	<script type="text/javascript">
		$(function(){
			
			$("body").on('click', '.edit_btn', function() {
				
				if($(this).html()=="编辑"){		
					num = $(this).attr("name");		
					$(".edit_box_"+num).show();
					$(".edit_info_"+num).hide();
					$(this).html("完成");
				}else{			
					num = $(this).attr("name");
					$(".edit_box_"+num).hide();
					$(".edit_info_"+num).show();
					$(this).html("编辑");
					cart_list();
				}
			});
		})	
		function selcart_submit(){
			$.post('/cart/pay_sub', {data:1
			}, function(result) {
				if(result.code==1){
					self.location='/pay/paymentOrder'; 
				}
				if(result.code==2){
					self.location='/user/login'; 
				}
			}, "json");
		}
	</script>
	
	</body>

</html>